//
//  HWfaxiangFoundViewController.m
//  HWanGame
//
//  Created by 陈道斌 on 2020/9/23.
//  Copyright © 2020 Chendaobin. All rights reserved.
//  发现 

#import "HWfaxiangFoundViewController.h"
#import "HWFaxiangTableViewCell.h" //  HWFaxiangTableViewCell
#import "HWFaxianModel.h"

#import "HWWebViewGameViewController.h"
#import "HWanGame-Swift.h"


@interface HWfaxiangFoundViewController ()<UITableViewDelegate,UITableViewDataSource,JXSegmentedListContainerViewListDelegate>

@property(strong,nonatomic) UITableView *mainaTableVie;
@property(strong,nonatomic) UIView *headerView; //tabbarView
@property(strong,nonatomic) UIView *biaoqianView;
@property(strong,nonatomic) UIButton *selectButton;
@property(strong,nonatomic) NSString *reQiP;
@property(strong,nonatomic) NSString *reQiMax_p;
@property(strong,nonatomic) NSMutableArray *dataMuArr;
@property(assign,nonatomic) int xuanzhongtap;

@end

@implementation HWfaxiangFoundViewController


-(UITableView *)mainaTableVie {
    
    if (_mainaTableVie == nil
        ) {
        
        
        _mainaTableVie = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, kScreenH-CF_NavHeight-44-CF_TabbarHeight) style:UITableViewStylePlain];
        _mainaTableVie.delegate = self;
        _mainaTableVie.dataSource = self;
          _mainaTableVie.separatorStyle = UITableViewCellSeparatorStyleNone;
         _mainaTableVie.backgroundColor = [UIColor whiteColor];
         _mainaTableVie.backgroundColor = RGB(247, 247, 247);


        
    }
    return   _mainaTableVie ;
}
- (UIView *)listView {
    return  self.view;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    // Do any additional setup after loading the view.
    
   //  self.view.backgroundColor = [UIColor redColor];
    [self setupchangyongdeshuxin];
    
    // 设置UI
    [self setupUI];
    
    
    //  NSArray *arr = @[@"zuixinhuoyan",@"xingwenappheh",@"youxigunlv",@"xingyoxucelb",@"xingyouzixun"];
    
   //  SDKXIngRequest
    
    
}


- (void)setupchangyongdeshuxin {
    
    self.xuanzhongtap = 0;
    
}



// 设置UI
- (void)setupUI {
     
    [self.view  addSubview:self.mainaTableVie];
    
    
    [self addheadeView];
    
    
    
    [self addrefreshControl];
    
    
    
    
    
    
    
    
}



- (void)addheadeView  {
    
    
    
    self.headerView  = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, 94+10)];
    self.mainaTableVie.tableHeaderView = self.headerView;
    self.headerView.backgroundColor = RGB(247, 247, 247);
    
    
    
    
    
    self.biaoqianView  = [[UIView  alloc] initWithFrame:CGRectMake(0, 0, kScreenW, 94)];
    
    self.biaoqianView.backgroundColor = [UIColor whiteColor];
    
    [self.headerView addSubview:self.biaoqianView];
  //   NSArray  *biaotiArray = @[@"平台推荐",@"游戏新闻",@"游戏攻略",@"新游测评",@"新游快讯"];
    NSArray  *biaotiArray = @[[HWjianzhiduiObject keylocalization:@"平台推荐"],[HWjianzhiduiObject keylocalization:@"游戏新闻"],[HWjianzhiduiObject keylocalization:@"游戏攻略"],[HWjianzhiduiObject keylocalization:@"新游测评"],[HWjianzhiduiObject keylocalization:@"新游快讯"]];
   
    
     NSArray *icoArr = @[@"zuixinhuyan",@"xingwenappheh",@"youxigunlv",@"xingyoxucelb",@"xingyouzixun"];
    
     NSInteger count = biaotiArray.count;
      CGFloat btnW = 80;
      CGFloat btnH = 26+8+20;
      CGFloat btnX = 0;
      for (NSInteger i = 0; i < count; i++) {
          
          
          
         CGFloat  jiaju =  (kScreenW - count *80) / (count+ 1);
          
           btnX = i * btnW + jiaju*(i+1);
          
          UIButton *titleButton = [UIButton setButtonWithFrame:CGRectMake(btnX, 20, btnW, btnH) Title:biaotiArray[i] Image:icoArr[i] Font:14 Color:[UIColor blackColor] Target:nil Selector:nil];
          titleButton.tag = i;
          [titleButton layoutButtonWithEdgeInsetsStyle:MKButtonEdgeInsetsStyleTop imageTitleSpace:8];
    
          //  UIViewController *vc = self.childViewControllers[i];
        //   titleButton.backgroundColor = [UIColor redColor];
          [titleButton setTitle:biaotiArray[i] forState:UIControlStateNormal];
         
         
         //  jiaju =  5;
          
          
          
          
          titleButton.frame = CGRectMake(btnX, 20, btnW, btnH);
          [titleButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
          //    titleButton.backgroundColor = [UIColor redColor];
          titleButton.titleLabel.font = [UIFont systemFontOfSize:14];
          // 监听按钮点击
          [titleButton addTarget:self action:@selector(selButton:) forControlEvents:UIControlEventTouchUpInside];
          
          [self.biaoqianView  addSubview:titleButton];
          
          // 把标题按钮保存到对应的数组
          // [ self.biaoqianView addObject:titleButton];
          
          if (i == 0 ) {
                 [titleButton setTitleColor:QCchunseshensetupian forState:UIControlStateNormal];
                 self.selectButton = titleButton;
              
          }
          
        
         //  [self.titleScrollView addSubview:titleButton];
      }
      
     
    
    
    
}

- (void)selButton:(UIButton *)button
{
    [_selectButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [button setTitleColor:QCchunseshensetupian forState:UIControlStateNormal];
    _selectButton = button;
    self.xuanzhongtap = button.tag;
   [self.mainaTableVie.mj_header beginRefreshing];
    
    
}



#pragma  mark ---- 添加刷新

- (void)addrefreshControl {
    
    self.mainaTableVie.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(underRefresh)];
    
    [self.mainaTableVie.mj_header beginRefreshing];
    
    self.mainaTableVie.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(onRefresh)];
}


#pragma  mark --------- 下拉刷新
- (void)underRefresh {
    
    //    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
    //        // 结束刷新
    //        [self.mainaTableVie.mj_header endRefreshing];
    //    });
    
    
    // [SVProgressHUD show];
    

        __weak typeof(self) weakSelf = self;

        self.reQiP  = @"1";
    
        NSString *xuanzhongstr =  [NSString stringWithFormat:@"%d",self.xuanzhongtap];
    
    
        self.dataMuArr = [[NSMutableArray alloc]init];
    
            NSString *userID = [HWLocallyStoredData getLoginUserID];
            NSString *tStr = [NSString stringWithFormat:@"%ld",[WMUtil getTimeSp]];
             NSString *sign = [NSString stringWithFormat:@"%@%@",tStr,@"fsd213ewdsadqwe2121213edsad"];
             NSString *signMD5 = [WMUtil md5HexDigest:sign];
//             NSDictionary *parametes = @{
//                                        @"ct" :  @"app",
//                                        @"ac" : @"index",
//                                        @"ios" : @"1",
//                                        @"t" :tStr,
//                                        @"sign": signMD5,
//                                        @"type" :self.typeStr,
//                                        @"classid":xuanzhongstr,
//                                        @"p":self.reQiP,
//                                        @"member_id":[HWLocallyStoredData getCode],
//
//                                        };
//
    NSDictionary *parametes = @{
                                     
                                          @"ios" : @"1",
                                          @"t" :tStr,
                                          @"sign": signMD5,
                                          @"type" :self.typeStr,
                                          @"classid":xuanzhongstr,
                                          @"p":self.reQiP,
                                          @"member_id":[HWLocallyStoredData getCode],
                                          @"language":[HWjianzhiduiObject returnLanguageAcquisition],
        
         
    };
    
    
    
    
//  SDKXIngRequest
    
  
    
    [HWWebUtils do4GetWithParameters:parametes   hiddenparameterStr:HW_index  progress:nil success:^(id response) {
        
        // [SVProgressHUD dismiss];
        [self.mainaTableVie.mj_header endRefreshing];
        [self.mainaTableVie.mj_footer endRefreshing];
        
        
        NSString *codeStr =  [NSString stringWithFormat:@"%@",response[@"code"]];

        if ([codeStr intValue] == 1) {
            
            
            
            self.dataMuArr =   [HWFaxianModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
            
           
            self.reQiP  =  [NSString stringWithFormat:@"%@",response[@"p"]];
             
            self.reQiMax_p =   [NSString stringWithFormat:@"%@",response[@"max_p"]];
            
            [self.mainaTableVie reloadData];
            
            
           
        }
        NSLog(@"%@",response);
        
        
    } failure:^(NSString *error) {
        [self.mainaTableVie.mj_header endRefreshing];
        [self.mainaTableVie.mj_footer endRefreshing];
        
        
    }];
    
    
    
}

#pragma  mark ---------- 上拉刷新
- (void)onRefresh {
    
    

    
    
    
    __weak typeof(self) weakSelf = self;
    
    
    if ([self.reQiP intValue] > [self.reQiMax_p intValue]) {
        
        [self.mainaTableVie.mj_header endRefreshing];
        [self.mainaTableVie.mj_footer endRefreshing];

        [MBProgressHUD showError:@"暂时没有新数据"];
        
        
        return;
    }
       

       
         //   self.reQiP  = @"1";
       
         NSString *xuanzhongstr =  [NSString stringWithFormat:@"%d",self.xuanzhongtap];
       
       
         
       
               NSString *userID = [HWLocallyStoredData getLoginUserID];
               NSString *tStr = [NSString stringWithFormat:@"%ld",[WMUtil getTimeSp]];
                NSString *sign = [NSString stringWithFormat:@"%@%@",tStr,@"fsd213ewdsadqwe2121213edsad"];
                NSString *signMD5 = [WMUtil md5HexDigest:sign];
//                NSDictionary *parametes = @{
//                                           @"ct" :  @"app",
//                                           @"ac" : @"index",
//                                           @"ios" : @"1",
//                                           @"t" :tStr,
//                                           @"sign": signMD5,
//                                           @"type" :self.typeStr,
//                                           @"classid":xuanzhongstr,
//                                           @"p":self.reQiP,
//                                            @"member_id":[HWLocallyStoredData getCode],
//
//                                           };
    
    
     NSDictionary *parametes = @{
                                         
                                              @"ios" : @"1",
                                              @"t" :tStr,
                                              @"sign": signMD5,
                                              @"type" :self.typeStr,
                                              @"classid":xuanzhongstr,
                                              @"p":self.reQiP,
                                               @"member_id":[HWLocallyStoredData getCode],
                                              @"language":[HWjianzhiduiObject returnLanguageAcquisition],
                                  
                                              };
    
        
       
       [HWWebUtils do4GetWithParameters:parametes    hiddenparameterStr:HW_index   progress:nil success:^(id response) {
           
           // [SVProgressHUD dismiss];
           [self.mainaTableVie.mj_header endRefreshing];
           [self.mainaTableVie.mj_footer endRefreshing];
           
           
           NSString *codeStr =  [NSString stringWithFormat:@"%@",response[@"code"]];

           if ([codeStr intValue] == 1) {
               
               
               
              NSMutableArray *arr =     [HWFaxianModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
               
               
               for (int i = 0 ; i <  arr.count; i++) {
                   
                   
                   
                   [self.dataMuArr addObject:arr[i]];
                   
                   
                   
               }
               
               
               
               
               
               
              
               self.reQiP  =  [NSString stringWithFormat:@"%@",response[@"p"]];
                
               self.reQiMax_p =   [NSString stringWithFormat:@"%@",response[@"max_p"]];
               
               [self.mainaTableVie reloadData];
               
               
              
           }
           NSLog(@"%@",response);
           
           
       } failure:^(NSString *error) {
           [self.mainaTableVie.mj_header endRefreshing];
           [self.mainaTableVie.mj_footer endRefreshing];
           
           
       }];
    
    
    
}








- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return self.dataMuArr.count;
      
}

 

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    static  NSString *cellID = @"cellID";
    
    HWFaxiangTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    
    if (!cell) {
        cell =  [[NSBundle mainBundle]loadNibNamed:@"HWFaxiangTableViewCell" owner:nil options:nil].firstObject;
    }
    
    
    HWFaxianModel *model = self.dataMuArr[indexPath.row];
    [cell.tupianImageView sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:nil];
    
    cell.biaotiLabel.text = model.title;
    cell.riqiLabel.text = model.time;
    
    return cell;
    
    
}



- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    return  265;
    
    
    
    
    
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
       HWFaxianModel *model = self.dataMuArr[indexPath.row];
    
    
    
       HWWebViewGameViewController *webview = [[HWWebViewGameViewController alloc]init];
        webview.urlString = [NSString stringWithFormat:@"%@?ct=aznews&ac=info&id=%@&language=%@",[HWOCGlobalConst baseUrl],model.id,[HWjianzhiduiObject returnLanguageAcquisition]];
               
        webview.gname =model.title;
        webview.hidesBottomBarWhenPushed = YES;
        [self.navigationController pushViewController:webview animated:YES];
          
          
    
    
}











/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end









#pragma mark ----------------- 以前的代码


//#import "HWfaxiangFoundViewController.h"
//#import "HWFaxiangTableViewCell.h" //  HWFaxiangTableViewCell
//#import "HWFaxianModel.h"
//
//#import "HWWebViewGameViewController.h"
//
//
//
//@interface HWfaxiangFoundViewController ()<UITableViewDelegate,UITableViewDataSource>
//
//@property(strong,nonatomic) UITableView *mainaTableVie;
//@property(strong,nonatomic) UIView *headerView; //tabbarView
//@property(strong,nonatomic) UIView *biaoqianView;
//@property(strong,nonatomic) UIButton *selectButton;
//
//@property(strong,nonatomic) NSString *reQiP;
//@property(strong,nonatomic) NSString *reQiMax_p;
//@property(strong,nonatomic) NSMutableArray *dataMuArr;
//@property(assign,nonatomic) int xuanzhongtap;
//
//
//
//
//
//
//
//@end
//
//@implementation HWfaxiangFoundViewController
//
//
//-(UITableView *)mainaTableVie {
//
//    if (_mainaTableVie == nil
//        ) {
//
//
//        _mainaTableVie = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, kScreenH-CF_NavHeight-44-CF_TabbarHeight) style:UITableViewStylePlain];
//        _mainaTableVie.delegate = self;
//        _mainaTableVie.dataSource = self;
//          _mainaTableVie.separatorStyle = UITableViewCellSeparatorStyleNone;
//         _mainaTableVie.backgroundColor = [UIColor whiteColor];
//         _mainaTableVie.backgroundColor = RGB(247, 247, 247);
//
//
//
//    }
//    return   _mainaTableVie ;
//}
//
//
//- (void)viewDidLoad {
//    [super viewDidLoad];
//
//
//    // Do any additional setup after loading the view.
//
//   //  self.view.backgroundColor = [UIColor redColor];
//    [self setupchangyongdeshuxin];
//
//    // 设置UI
//    [self setupUI];
//
//
//    //  NSArray *arr = @[@"zuixinhuoyan",@"xingwenappheh",@"youxigunlv",@"xingyoxucelb",@"xingyouzixun"];
//
//
//
//
//}
//
//
//- (void)setupchangyongdeshuxin {
//
//    self.xuanzhongtap = 0;
//
//}
//
//
//
//// 设置UI
//- (void)setupUI {
//
//    [self.view  addSubview:self.mainaTableVie];
//
//
//    [self addheadeView];
//
//
//
//    [self addrefreshControl];
//
//
//
//
//
//
//
//
//}
//
//
//
//- (void)addheadeView  {
//
//
//
//    self.headerView  = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenW, 94+10)];
//    self.mainaTableVie.tableHeaderView = self.headerView;
//    self.headerView.backgroundColor = RGB(247, 247, 247);
//
//
//
//
//
//    self.biaoqianView  = [[UIView  alloc] initWithFrame:CGRectMake(0, 0, kScreenW, 94)];
//
//    self.biaoqianView.backgroundColor = [UIColor whiteColor];
//
//    [self.headerView addSubview:self.biaoqianView];
//    NSArray  *biaotiArray = @[@"平台推荐",@"游戏新闻",@"游戏攻略",@"新游测评",@"新游快讯"];
//
//     NSArray *icoArr = @[@"zuixinhuyan",@"xingwenappheh",@"youxigunlv",@"xingyoxucelb",@"xingyouzixun"];
//
//     NSInteger count = biaotiArray.count;
//      CGFloat btnW = 80;
//      CGFloat btnH = 26+8+20;
//      CGFloat btnX = 0;
//      for (NSInteger i = 0; i < count; i++) {
//
//
//
//         CGFloat  jiaju =  (kScreenW - count *80) / (count+ 1);
//
//           btnX = i * btnW + jiaju*(i+1);
//
//          UIButton *titleButton = [UIButton setButtonWithFrame:CGRectMake(btnX, 20, btnW, btnH) Title:biaotiArray[i] Image:icoArr[i] Font:14 Color:[UIColor blackColor] Target:nil Selector:nil];
//          titleButton.tag = i;
//          [titleButton layoutButtonWithEdgeInsetsStyle:MKButtonEdgeInsetsStyleTop imageTitleSpace:8];
//
//          //  UIViewController *vc = self.childViewControllers[i];
//        //   titleButton.backgroundColor = [UIColor redColor];
//          [titleButton setTitle:biaotiArray[i] forState:UIControlStateNormal];
//
//
//         //  jiaju =  5;
//
//
//
//
//          titleButton.frame = CGRectMake(btnX, 20, btnW, btnH);
//          [titleButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
//          //    titleButton.backgroundColor = [UIColor redColor];
//          titleButton.titleLabel.font = [UIFont systemFontOfSize:14];
//          // 监听按钮点击
//          [titleButton addTarget:self action:@selector(selButton:) forControlEvents:UIControlEventTouchUpInside];
//
//          [self.biaoqianView  addSubview:titleButton];
//
//          // 把标题按钮保存到对应的数组
//          // [ self.biaoqianView addObject:titleButton];
//
//          if (i == 0 ) {
//                 [titleButton setTitleColor:QCchunseshensetupian forState:UIControlStateNormal];
//                 self.selectButton = titleButton;
//
//          }
//
//
//         //  [self.titleScrollView addSubview:titleButton];
//      }
//
//
//
//
//
//}
//
//- (void)selButton:(UIButton *)button
//{
//    [_selectButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
//    [button setTitleColor:QCchunseshensetupian forState:UIControlStateNormal];
//    _selectButton = button;
//    self.xuanzhongtap = button.tag;
//   [self.mainaTableVie.mj_header beginRefreshing];
//
//
//}
//
//
//
//#pragma  mark ---- 添加刷新
//
//- (void)addrefreshControl {
//
//    self.mainaTableVie.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(underRefresh)];
//
//    [self.mainaTableVie.mj_header beginRefreshing];
//
//    self.mainaTableVie.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(onRefresh)];
//}
//
//
//#pragma  mark --------- 下拉刷新
//- (void)underRefresh {
//
//    //    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//    //        // 结束刷新
//    //        [self.mainaTableVie.mj_header endRefreshing];
//    //    });
//
//
//    // [SVProgressHUD show];
//
//
//        __weak typeof(self) weakSelf = self;
//
//        self.reQiP  = @"1";
//
//        NSString *xuanzhongstr =  [NSString stringWithFormat:@"%d",self.xuanzhongtap];
//
//
//        self.dataMuArr = [[NSMutableArray alloc]init];
//
//            NSString *userID = [HWLocallyStoredData getLoginUserID];
//            NSString *tStr = [NSString stringWithFormat:@"%ld",[WMUtil getTimeSp]];
//             NSString *sign = [NSString stringWithFormat:@"%@%@",tStr,@"fsd213ewdsadqwe2121213edsad"];
//             NSString *signMD5 = [WMUtil md5HexDigest:sign];
//             NSDictionary *parametes = @{
//                                        @"ct" :  @"app",
//                                        @"ac" : @"index",
//                                        @"ios" : @"1",
//                                        @"t" :tStr,
//                                        @"sign": signMD5,
//                                        @"type" :self.typeStr,
//                                        @"classid":xuanzhongstr,
//                                        @"p":self.reQiP,
//                                        @"member_id":[HWLocallyStoredData getCode],
//
//                                        };
//
//    [HWWebUtils do3GetWithParameters:parametes  progress:nil success:^(id response) {
//
//        // [SVProgressHUD dismiss];
//        [self.mainaTableVie.mj_header endRefreshing];
//        [self.mainaTableVie.mj_footer endRefreshing];
//
//
//        NSString *codeStr =  [NSString stringWithFormat:@"%@",response[@"code"]];
//
//        if ([codeStr intValue] == 1) {
//
//
//
//            self.dataMuArr =   [HWFaxianModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
//
//
//            self.reQiP  =  [NSString stringWithFormat:@"%@",response[@"p"]];
//
//            self.reQiMax_p =   [NSString stringWithFormat:@"%@",response[@"max_p"]];
//
//            [self.mainaTableVie reloadData];
//
//
//
//        }
//        NSLog(@"%@",response);
//
//
//    } failure:^(NSString *error) {
//        [self.mainaTableVie.mj_header endRefreshing];
//        [self.mainaTableVie.mj_footer endRefreshing];
//
//
//    }];
//
//
//
//}
//
//#pragma  mark ---------- 上拉刷新
//- (void)onRefresh {
//
//
//
//
//
//
//    __weak typeof(self) weakSelf = self;
//
//
//    if ([self.reQiP intValue] > [self.reQiMax_p intValue]) {
//
//        [self.mainaTableVie.mj_header endRefreshing];
//        [self.mainaTableVie.mj_footer endRefreshing];
//
//        [MBProgressHUD showError:@"暂时没有新数据"];
//
//
//        return;
//    }
//
//
//
//         //   self.reQiP  = @"1";
//
//         NSString *xuanzhongstr =  [NSString stringWithFormat:@"%d",self.xuanzhongtap];
//
//
//
//
//               NSString *userID = [HWLocallyStoredData getLoginUserID];
//               NSString *tStr = [NSString stringWithFormat:@"%ld",[WMUtil getTimeSp]];
//                NSString *sign = [NSString stringWithFormat:@"%@%@",tStr,@"fsd213ewdsadqwe2121213edsad"];
//                NSString *signMD5 = [WMUtil md5HexDigest:sign];
//                NSDictionary *parametes = @{
//                                           @"ct" :  @"app",
//                                           @"ac" : @"index",
//                                           @"ios" : @"1",
//                                           @"t" :tStr,
//                                           @"sign": signMD5,
//                                           @"type" :self.typeStr,
//                                           @"classid":xuanzhongstr,
//                                           @"p":self.reQiP,
//                                            @"member_id":[HWLocallyStoredData getCode],
//
//                                           };
//
//       [HWWebUtils do3GetWithParameters:parametes progress:nil success:^(id response) {
//
//           // [SVProgressHUD dismiss];
//           [self.mainaTableVie.mj_header endRefreshing];
//           [self.mainaTableVie.mj_footer endRefreshing];
//
//
//           NSString *codeStr =  [NSString stringWithFormat:@"%@",response[@"code"]];
//
//           if ([codeStr intValue] == 1) {
//
//
//
//              NSMutableArray *arr =     [HWFaxianModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
//
//
//               for (int i = 0 ; i <  arr.count; i++) {
//
//
//
//                   [self.dataMuArr addObject:arr[i]];
//
//
//
//               }
//
//
//
//
//
//
//
//               self.reQiP  =  [NSString stringWithFormat:@"%@",response[@"p"]];
//
//               self.reQiMax_p =   [NSString stringWithFormat:@"%@",response[@"max_p"]];
//
//               [self.mainaTableVie reloadData];
//
//
//
//           }
//           NSLog(@"%@",response);
//
//
//       } failure:^(NSString *error) {
//           [self.mainaTableVie.mj_header endRefreshing];
//           [self.mainaTableVie.mj_footer endRefreshing];
//
//
//       }];
//
//
//
//}
//
//
//
//
//
//
//
//
//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
//
//    return self.dataMuArr.count;
//
//}
//
//
//
//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//
//    static  NSString *cellID = @"cellID";
//
//    HWFaxiangTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
//
//    if (!cell) {
//        cell =  [[NSBundle mainBundle]loadNibNamed:@"HWFaxiangTableViewCell" owner:nil options:nil].firstObject;
//    }
//
//
//    HWFaxianModel *model = self.dataMuArr[indexPath.row];
//    [cell.tupianImageView sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:nil];
//
//    cell.biaotiLabel.text = model.title;
//    cell.riqiLabel.text = model.time;
//
//    return cell;
//
//
//}
//
//
//
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
//
//    return  265;
//
//
//
//
//
//}
//
//
//- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
//
//       HWFaxianModel *model = self.dataMuArr[indexPath.row];
//
//
//
//       HWWebViewGameViewController *webview = [[HWWebViewGameViewController alloc]init];
//        webview.urlString = [NSString stringWithFormat:@"%@?ct=aznews&ac=info&id=%@",[HWGlobalConst baseUrl],model.id];
//
//        webview.gname =model.title;
//        webview.hidesBottomBarWhenPushed = YES;
//        [self.navigationController pushViewController:webview animated:YES];
//
//
//
//
//}
//
//
//
//
//
//
//
//
//
//
//
///*
//#pragma mark - Navigation
//
//// In a storyboard-based application, you will often want to do a little preparation before navigation
//- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
//    // Get the new view controller using [segue destinationViewController].
//    // Pass the selected object to the new view controller.
//}
//*/
//
//@end

